home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / info-service / gopher / Unix / xgopher.1.3 / gui.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-04-30  |  4.9 KB  |  264 lines

  1. /* gui.h
  2.    declarations for functions in gui.c */
  3.  
  4.      /*---------------------------------------------------------------*/
  5.      /* Xgopher        version 1.3     08 April 1993                  */
  6.      /*                version 1.2     20 November 1992               */
  7.      /*                version 1.1     20 April 1992                  */
  8.      /*                version 1.0     04 March 1992                  */
  9.      /* X window system client for the University of Minnesota        */
  10.      /*                                Internet Gopher System.        */
  11.      /* Allan Tuchman, University of Illinois at Urbana-Champaign     */
  12.      /*                Computing and Communications Services Office   */
  13.      /* Copyright 1992, 1993 by                                       */
  14.      /*           the Board of Trustees of the University of Illinois */
  15.      /* Permission is granted to freely copy and redistribute this    */
  16.      /* software with the copyright notice intact.                    */
  17.      /*---------------------------------------------------------------*/
  18.  
  19. #ifndef    GUI_H
  20. #define    GUI_H
  21. #include "gopher.h"
  22. #include "status.h"
  23. #include "popres.h"
  24. #include <X11/Intrinsic.h>
  25.  
  26. #define XgRShowLevel    "ShowLevel"
  27. typedef enum { showAll, showKnown, showAccessible, showAvailable } showLevel;
  28. #define showEAll    "all"
  29. #define showEKnown    "known"
  30. #define showEAccessible    "accessible"
  31. #define showEAvailable    "available"
  32.  
  33. #define XgRCopyType    "CopyType"
  34. #define copyTypeEUnspec    "unspecified"
  35. #define copyTypeENone    "none"
  36. #define copyTypeEAscii    "ascii"
  37. #define copyTypeEBinary    "binary"
  38. #define copyTypeEBinaryEOF    "binaryEOF"
  39.  
  40. #define fromENone    "none"
  41. #define fromEPointer    "pointer"
  42. #define fromEMain    "application"
  43. #define fromEWidget    "widget"
  44. #define fromEScreen    "screen"
  45.  
  46. #define justETop    "top"
  47. #define justELeft    "left"
  48. #define justECenter    "center"
  49. #define justEBottom    "bottom"
  50. #define justERight    "right"
  51.  
  52. Boolean    cvtStringToShowLevel(
  53. #ifdef PROTO
  54.     Display *,    /* dpy */
  55.     XrmValuePtr,    /* args */
  56.     Cardinal *,    /* num_args */
  57.     XrmValuePtr,    /* fromVal */
  58.     XrmValuePtr,    /* toVal */
  59.     XtPointer *    /* closureRet */
  60. #endif
  61. );
  62.  
  63. Boolean    cvtStringToPositionFrom(
  64. #ifdef PROTO
  65.     Display *,    /* dpy */
  66.     XrmValuePtr,    /* args */
  67.     Cardinal *,    /* num_args */
  68.     XrmValuePtr,    /* fromVal */
  69.     XrmValuePtr,    /* toVal */
  70.     XtPointer *    /* closureRet */
  71. #endif
  72. );
  73.  
  74. Boolean    cvtStringToJustification(
  75. #ifdef PROTO
  76.     Display *,    /* dpy */
  77.     XrmValuePtr,    /* args */
  78.     Cardinal *,    /* num_args */
  79.     XrmValuePtr,    /* fromVal */
  80.     XrmValuePtr,    /* toVal */
  81.     XtPointer *    /* closureRet */
  82. #endif
  83. );
  84.  
  85. Boolean    cvtStringToCopyType(
  86. #ifdef PROTO
  87.     Display *,    /* dpy */
  88.     XrmValuePtr,    /* args */
  89.     Cardinal *,    /* num_args */
  90.     XrmValuePtr,    /* fromVal */
  91.     XrmValuePtr,    /* toVal */
  92.     XtPointer *    /* closureRet */
  93. #endif
  94. );
  95.  
  96. BOOLEAN    initGUI(
  97. #ifdef PROTO
  98.     int *,        /* argc */
  99.     char **        /* argv */
  100. #endif
  101. );
  102.  
  103. static BOOLEAN    getOptions(
  104. #ifdef PROTO
  105.     int,        /* argc */
  106.     char **        /* argv */
  107. #endif
  108. );
  109.  
  110. void    closeGUIandQuit(
  111. #ifdef PROTO
  112.     int        /* rc */
  113. #endif
  114. );
  115.  
  116. void    loadMarks(
  117. );
  118.  
  119. void    markCurrentDirectory(
  120. );
  121.  
  122. void    doUserRequests(
  123. );
  124.  
  125. void    makeXThings(
  126. );
  127.  
  128. gopherItemP    getSelectedItem(
  129. );
  130.  
  131. void    markCurrentDirectory(
  132. );
  133.  
  134. void    showError(
  135. #ifdef PROTO
  136.     char *        /* message */
  137. #endif
  138. );
  139.  
  140. void    showFatalError(
  141. #ifdef PROTO
  142.     char *        /* message */
  143. #endif
  144. );
  145.  
  146. void    showInfo(
  147. #ifdef PROTO
  148.     char *        /* message */
  149. #endif
  150. );
  151.  
  152. void    showStatus(
  153. #ifdef PROTO
  154.     char *,        /* message */
  155.     statusType,    /* statType */ 
  156.     char *,        /* host */
  157.     int        /* port */
  158. #endif
  159. );
  160.  
  161. void    displayCurrent(
  162. );
  163.  
  164. void    displayBookmarks(
  165. );
  166.  
  167. void    checkPanelButtons(
  168. );
  169.  
  170. void    clearBookmarks(
  171. );
  172.  
  173. void    showFile(
  174. #ifdef PROTO
  175.     gopherItemP,    /* gi */
  176.     char *,        /* title */
  177.     char *,        /* fileName */ 
  178.     char *        /* indexString */ 
  179. #endif
  180. );
  181.  
  182. void    showNameServer(
  183. #ifdef PROTO
  184.     char *,        /* title */
  185.     int        /* s */ 
  186. #endif
  187. );
  188.  
  189. void    showIndex(
  190. #ifdef PROTO
  191.     gopherItemP         /* gi */
  192. #endif
  193. );
  194.  
  195. void showHelp(
  196. #ifdef PROTO
  197.     char *        /* key */
  198. #endif
  199. );
  200.  
  201. #define POS_none        0
  202. #define POS_pointer     1
  203. #define POS_appPanel    2
  204. #define POS_screen      3
  205.  
  206. void setPopupGeometry(
  207. #ifdef PROTO
  208.     Widget,      /* w */
  209.     popupPosResources *    /* placement */
  210. #endif
  211. );
  212.  
  213. void findPopupPosition(
  214. #ifdef PROTO
  215.     Widget,            /* w */
  216.     Widget,            /* fromWidget */
  217.     popupPosResources *,    /* placement */
  218.     Position *,        /* rootX */
  219.     Position *        /* rootY */
  220. #endif
  221. );
  222.  
  223. void positionAPopup(
  224. #ifdef PROTO
  225.     Widget,      /* w */
  226.     Widget,        /* fromWidget */
  227.     popupPosResources *    /* placement */
  228. #endif
  229. );
  230.  
  231. void setTextWidgetSize(
  232. #ifdef PROTO
  233.     Widget,        /* textWidget */
  234.     int,        /* width */
  235.     int        /* height */
  236. #endif
  237. );
  238.  
  239. void getTextSize(
  240. #ifdef PROTO
  241.     Widget,        /* textWidget */
  242.     int,        /* width */
  243.     int,        /* height */
  244.     Dimension *,        /* retun width in pixels */
  245.     Dimension *        /* retun height in pixels */
  246. #endif
  247. );
  248.  
  249. static void maxWaitTimeProc(
  250. #ifdef PROTO
  251.     XtPointer,    /* clientData */
  252.     XtIntervalId *    /* id */
  253. #endif
  254. );
  255.  
  256. void WaitForAllPendingEventsAndExpose(
  257. #ifdef PROTO
  258.     Display *,    /* dpy */
  259.     Window        /* needToSee */
  260. #endif
  261. );
  262.  
  263. #endif    /* GUI_H */
  264.